<template>
  <el-select v-model="dataValue"
  :filterable="attrs.filterable"
  :clearable="attrs.clearable"
  :multiple="attrs.multiple"
  :collapse-tags="attrs.collapseTags"
  :allow-create="attrs.allowCreate"
  :default-first-option="attrs.defaultFirstOption"
  :disabled="disabled"
  @change="valueChange"
  style="width: 100%;"
  :placeholder="attrs.placeholder ? attrs.placeholder : `请选择${label}`">
    <el-option
      v-for="(item, index) in option"
      :key="index"
      :label="item"
      :value="item"
      :disabled="item.disabled">
      <component :is="attrs.template" :item="item" :index="index" />
    </el-option>
  </el-select>
</template>
<script type="text/javascript">
import XMixIn from './XMixIn'
import nationData from './js/nation-data'
export default {
  mixins: [XMixIn],
  data () {
    return {
      option: nationData
    }
  }
}
</script>
